package games.platformer.behaviors;


/**
 * When two of the objects interest the collision causes the object to stop but not change direction.
 * 
 * @author Jonathan Odom
 */
public class IntersectAndStop extends Intersect
{
    public IntersectAndStop (vooga.geom.Vector velocity,
    		vooga.entities.Entity obstacle)
    {
        super(velocity, obstacle);
    }

    public IntersectAndStop (vooga.geom.Vector velocity,
                               java.util.List<vooga.entities.Entity> obstacles)
    {
        super(velocity, obstacles);
    }
    
    public IntersectAndStop (vooga.geom.Vector velocity,
            java.util.Collection<vooga.entities.Entity> obstacles)
    {
    	super(velocity, obstacles);
	}


    protected void onCollide (vooga.entities.Entity lhs, vooga.entities.Entity rhs)
    {
        lhs.getVelocity().setMagnitude(0);
    }
}
